<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>登录成功！！！</title>
</head>
<body>
<form action="user.php" method="post">
    <button type="submit">点击进入用户中心</button>
</form>
</body>
</html>
<?php
$user=$_POST['username'];
$password=$_POST['pwd'];
//print_r($_POST);
echo '<br />';
if ($user=='admin' && $password=='888888'){
    echo '登入成功';
}else{
    echo '用户名或密码错误';
}
echo '<br />';
//设置COOKIES
setcookie('Token',md5($user,$password.time()),time()+24*3600);
